/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Save': '保存',
    'Export': '导出',
    'Import': '导入',
    'Settings': '设置',
    'Achievements': '成就',
    'Statistics': '统计',
    'Changelog': '更新日志',
    'Hotkeys': '快捷键',
    'ALL': '全部',
    'Default': '默认',
    'Point Upgrades': '点数升级',
    'Points': '点数',
    'Points Breakdown': '点数明细',
    'Priest': '牧师',
    'Pyromancer': '火法师',
    'Stealth': '隐身',
    'Successfully Imported Save.': '成功导入保存。',
    'Tabs slightly less wide': '标签宽度略小',
    'Turns': '回合',
    'Upgrade Monsters': '升级怪物',
    'Upgrade': '升级',
    'Fighter': '战士',
    'Game': '游戏',
    'Game Options': '游戏选项',
    'Game Over': '游戏结束',
    'Game options saved.': '游戏选项已保存。',
    'Gameplay adjustment: Stun effect removed at end of combat. The delay was pointless and had to go.': '游戏调整：在战斗结束时移除眩晕效果。 拖延是没有意义的，必须离开。',
    'Attack Rating vs Defense Rating': '攻击等级 & 防御等级',
    'Druid': '德鲁伊',
    'Dungeon Farms': '地牢农场',
    'Dungeon Odyssey': '地牢奥德赛',
    'Dungeons': '地牢',
    'Equip Improvements': '装备改进',
    'Equipped Items': '已装备物品',
    'Error: Invalid Save Data.': '错误：无效的保存数据。',
    'Export Save': '导出存档',
    'Cancel': '取消',
    'Offline': '离线',
    'Rogue': '盗贼',
    'Save Game': '保存游戏',
    'Saves': '存档',
    'Scroll drop chance / kill': '卷轴掉落几率/杀死',
    'Select Up to Four Party Members': '最多选择四名队友',
    'Selected Characters': '已选人物',
    'Spell-based ranged attack. Fire Magic.': '基于法术的远程攻击。 火魔法。',
    'Spell Effects Rendered': '法术效果渲染',
    'Sprite Rendering Order': '画面渲染顺序',
    'Stun': '眩晕',
    'Reset Game': '重置游戏',
    'Pause': '暂停',
    'Ranger': '游侠',
    'Map Overlay Rendered': '地图覆盖渲染',
    'Import Save': '导入存档',
    'Min gold per drop': '每次掉落的最小金币数',
    'Max gold per drop': '每次掉落的最大金币数',
    'Max monsters per room': '每个房间怪物最大数量',
    'Min monsters per room': '每个房间怪物最小数量',
    'Treasure chest chance': '百宝箱几率',
    'Unlockable character slot.': '可解锁的角色插槽。',
    'Unlockable potion slots.': '可解锁的药水槽。',
    'Upgrade farm discount.': '升级农场折扣。',
    'Upgrade scroll stacking.': '升级卷轴堆叠。',
    'Upgrade walking speed.': '升级步行速度。',
    'Value': '价值',
    'Tank character. Powerful melee attack.': '坦克角色。 强大的近战攻击。',
    'Stealth attack. Ranged/Melee hybrid. Helpful looting abilities.': '隐形攻击。 远程/近战混合。 有用的掠夺能力。',
    'Powerful Summoner/Priest Hybrid. Summons Wolves and a pet dog.': '强大的召唤者/牧师混合。召唤狼和宠物狗。',
    'MINMAXIA': 'MINMAXIA',
    'Castles': '城堡',
    'Canvas Rendering Options': '画布渲染选项',
    'Castles farm dungeons and earn your party kills.': '城堡农场地牢，赚取你的队伍杀死。',
    'Character Unlocked After First Prestige': '获得第一声望后解锁角色',
    'Character Unlocked After Second Prestige': '第二声望后解锁角色',
    'Character Unlocked After Third Prestige': '第三声望后解锁角色',
    'Cool Downs': '冷却',
    'Copy/Paste to Export': '复制/粘贴以导出',
    'Critical Hit': '暴击',
    'A healer and a killer. Melee combat plus spells to help the party.': '一个治愈者和一个杀手。 近战加上法术来帮助队伍。',
    'Active potion can be dropped.': '可以掉落活性药水。',
    'Beautiful and deadly. Ranged attack.': '美丽而致命。远程攻击。',
    'Pack': '包',
    'Party Creation': '创建队伍',
    'Paste Exported Save to Import': '粘贴之前导出的存档以导入',
    'The land of CLICKPOCALYPSE needs you!': '末日危机的大陆需要你！',
    'All the dungeons, forgotten temples, forbidden towers, dark mines, torture chambers, and claustrophobic caverns, which used to be such nice, family friendly environments, have been overrun with cruel monsters that just plain need killing.': '所有的地牢、被遗忘的神殿、禁塔、黑暗矿井、刑讯室和幽闭恐怖的洞穴，过去都是如此美好、适合家庭的环境，现在已经被需要杀死的残酷怪物所淹没。',
    'Only you can set things right, by selecting your brave champions, and murdering every single monster in the land.': '只有您可以通过选择勇敢的冠军并杀死这片土地上的每一个怪物来解决问题。',
    'Info': '信息',
    'Bookcases': '书柜',
    'Boss monster level same as max party member level.': 'Boss怪物等级与最大队友等级相同。',
    'Castles Conquered': '城堡被征服',
    'Current': '当前',
    'Delete Save': '删除存档',
    'Direct Kills': '直接击杀',
    'Doors Opened': '门打开了',
    'Farmed Kills': '农场杀戮',
    'Farms Purchased': '购买的农场',
    'Historic Items': '历史物品',
    'Health': '生命值',
    'HP Regen': '生命值回复',
    'Inventory': '库存',
    'Item Bonus': '物品奖励',
    'Items Sold': '物品出售',
    'Monsters': '怪物',
    'Monster Kills': '杀死的怪物',
    'Monster Gold': '怪物金币',
    'Minions Summoned': '召唤的仆从',
    'More Carnage': '更多大屠杀',
    'More Minion Achievements.': '更多爪牙成就。',
    'More Kills Per Farm': '每个农场更多的杀戮',
    'Dungeons Cleared': '地牢已清除',
    'Equip Item': '装备物品',
    'Extra Attack': '额外攻击',
    'Ferocious': '凶猛',
    'the Priest': '牧师',
    'the Ranger': '游侠',
    'the Pyromancer': '火法师',
    'the Fighter': '战士',
    'Start The Adventure!': '开始冒险！',
    'the Rogue': '盗贼',
    'Give your characters unique names.': '给你的角色独特的名字。',
    'the Druid': '德鲁伊',
    'You can add one more character, or click to play with a smaller party.': '您可以再添加1个角色，或点击以与较小的队伍开始游戏。',
    'You can add two more character, or click to play with a smaller party.': '您可以再添加2个角色，或点击以与较小的队伍开始游戏。',
    'You can add three more character, or click to play with a smaller party.': '您可以再添加3个角色，或点击以与较小的队伍开始游戏。',
    'Rooms Cleared': '已清理的房间',
    'Scrolls Used': '已使用的卷轴',
    'Sell Item': '出售物品',
    'Skill Bonus': '技能奖励',
    'Spell Bonus': '法术奖励',
    'Skills': '技能',
    'Spell Discount': '法术折扣',
    'Spells Cast': '法术施放',
    'Spirit': '精神',
    'Spirit Regen': '精神恢复',
    'Stun Count': '眩晕次数',
    'Summon Minion': '召唤仆从',
    'Time Played': '游戏时长',
    'Times Stunned': '眩晕时长',
    'Treasure Chests': '宝箱',
    'Uncommon Items': '罕见物品',
    'Turns Played': '回合数',
    'Winning The Game': '赢得比赛',
    'Kill Monster': '杀死怪物',
    'Items Found': '找到的物品',
    'Locked': '未解锁',
    'Praiseworthy': '可贵',
    'Potions Used': '使用的药水',
    'Offline Processing Enabled': '离线进度已启用',
    'Pyro': '火法师',
    'Boots': '靴子',
    'Casey': '凯西',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',

    //树游戏
    'Loading...': '加载中...',
    'Summoners will not wait for combat to call upon their minions.': '召唤师不会等待战斗来召唤他们的仆从。',
    'Lots of skill tree changes.': '许多技能树变化。',
    'Faster item gathering: minions help gather items.': '更快的物品收集：仆从帮助收集物品。',
    'Faster item gathering: adventurers help each other gather items.': '更快的物品收集：冒险者互相帮助收集物品。',
    'Upgraded Upgrade: \'Max Gold Per Drop\' can be upgraded to higher value': '升级升级：“每次掉落的最大金币数” 可以升级到更高的价值',
    'Spell cool downs greatly reduced.': '法术冷却时间大大减少。',
    'Small increase in walking speed.': '步行速度略有提高。',
    'Creative Commons licence': '知识共享许可',
    'Add game over screen.': '添加游戏结束界面。',
    'Changed upgrade buttons so that they will not reorder themselves strangely after being clicked.': '更改了升级按钮，以便它们在被点击后不会奇怪地重新排序。',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
    "\n": "",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": "",
    //树游戏
    "Show Milestones: ": "显示里程碑：",
    "Autosave: ": "自动保存: ",
    "Offline Prod: ": "离线生产: ",
    "Completed Challenges: ": "完成的挑战: ",
    "High-Quality Tree: ": "高质量树贴图: ",
    "Offline Time: ": "离线时间: ",
    "Theme: ": "主题: ",
    "Anti-Epilepsy Mode: ": "抗癫痫模式：",
    "In-line Exponent: ": "直列指数：",
    "Single-Tab Mode: ": "单标签模式：",
    "CLICKPOCALYPSE": "末日危机",
    "Farmed Dungeons (": "已扫荡地牢 (",
    "Level": "等级",
    "Lvl": "等级",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": " ",
    "\n": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^Balance adjustment: (.+)$/,
    /^New Potion: (.+)$/,
    /^Point upgrade: (.+)$/,
    /^Fixed (.+)$/,
    /^Bug fix: (.+)$/,
    /^(\d+)$/,
    /^(\d+)\-(\d+)\-(\d+)$/,
    /^([\d\.]+)e(\d+)$/,
    /^([\d\.]+)K$/,
    /^([\d\.]+)$/,
];
var cnExcludePostfix = [
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
//换行加空格：\n(.+)
var cnRegReplace = new Map([
	[/^Pyro ([\d\.]+)$/, '火法师 $1'],
	[/^([\d\.]+)\/sec$/, '$1\/秒'],
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^(\d+) Royal points$/, '$1 皇家点数'],
    [/^Cost: (\d+) RP$/, '成本：$1 皇家点数'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],

]);